<template>
	<view class="bond">
		<!-- 顶部导航 -->
		<diyNavBar value='保证金' color='#FF6F30' textright='记录' @goto="gotos"></diyNavBar>
		<!-- 顶部内容 -->
		<view class="bond-top">
			<text class="money">{{getData.bondprice}}</text>
			<text class="title">保证金</text>
			<view class="button">
				<view class="btn" @click="$util.redirectTo('/pages/marginrecharge/marginrecharge')">充值</view>
				<view class="btn" @click="$util.redirectTo('/pages/refundrecharge/refundrecharge')">退还</view>
			</view>
		</view>
		
		<!-- 内容介绍 -->
		<view class="content">
			<text class="title">保证金说明</text>
			<text class="text" v-html="getData.bzjsm"></text>
		</view>
		
		<loading-cover ref="loadingCover"></loading-cover>
		
	</view>
</template>

<script>
	import diyNavBar from '../../component/diy-nav/diy-navbar.vue'
	import loadingCover from '../../component/loading-cover/loading-cover.vue'
	export default{
		components:{diyNavBar,loadingCover},
		data(){
			return {
				textlist:[],
				getData:{}//初始化获取的数据
			}
		},
		onShow(){
			this.$http.sendrequest('/index/Bail',this.setData,{
				tokenJudge:true
			}).then(res=>{
				if(res.code == 1){
					this.getData = res.data;
					this.$refs.loadingCover.hide();
				}
			})
		},
		methods:{
			gotos(){
				this.$util.redirectTo('/pages/bondlist/bondlist')
			}
		}
	}
</script>

<style lang="scss" scoped>
	.bond{
		min-height: 100vh;
		background: $uni-content-background-color;
		.bond-top{
			color: #FFFFFF;
			font-weight: bold;
			padding-top: 30rpx;
			background: $uni-tabbar-hovercolor;
			height: 380rpx;
			display: flex;
			flex-direction: column;
			align-items: center;
			box-sizing: border-box;
			.money{
				font-size: 56rpx;
				margin-bottom: 8rpx;
			}
			.title{
				margin-bottom: 52rpx;
				font-size: 32rpx;
			}
			.button{
				display: flex;
				align-items: center;
				justify-content: space-between;
				font-size: 24rpx;
				padding: 0 128rpx;
				box-sizing: border-box;
				width: 100%;
				.btn{
					width: 160rpx;
					height: 60rpx;
					border: 2rpx solid #FFFFFF;
					border-radius: 60rpx;
					text-align: center;
					line-height: 60rpx;
				}
			}
		}
		.content{
			margin: 40rpx 30rpx;
			background: #FFFFFF;
			padding: 41rpx 36rpx;
			box-sizing: border-box;
			border-radius: 24rpx;
			font-size: 28rpx;
			font-weight: bold;
			display: flex;
			flex-direction: column;
			.title{
				margin-bottom: 22rpx;
			}
			.text{
				line-height: 1.6;
				font-weight: 400;
				font-size: 24rpx;
			}
			
		}
	}
</style>
